#include "Game.h"

#include <iostream>

Game *Game::s_pInstance = NULL;

Game::Game() : m_pWindow(0),
               m_pRenderer(0),
               m_bRunning(false),
               m_pGameStateMachine(0),
               m_playerLives(3),
               m_scrollSpeed(0.8),
               m_bLevelComplete(false),
               m_bChangingState(false)

{
    // TODO:
}

bool Game::init(const char *title, int xpos, int ypos, int width, int height, bool fullscreen)
{
    int flags = 0;

    // store the game width and height
    m_gameWidth = width;
    m_gameHeight = height;

    if (fullscreen)
    {
        flags = SDL_WINDOW_FULLSCREEN;
    }

    // attempt to initialise SDL
    if (SDL_Init(SDL_INIT_EVERYTHING) == 0)
    {
        std::cout << "[INFO]: SDL Init Everything OK\n";
        // init the window
        m_pWindow = SDL_CreateWindow(title, xpos, ypos, width, height, flags);

        return true;
    }
    // TODO:

    return true;
}
